package com.my.job.quartz;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author timo 2021/4/2
 */
@Data
@TableName("exam_quartz")
@NoArgsConstructor
@AllArgsConstructor
public class QuartzInfo {
    @TableId(
            value = "id",
            type = IdType.ASSIGN_UUID
    )
    private String id;
    /*wayBillScheduler*/
    private String serviceId;
    /*quartz*/
    /**执行时间--quartz*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date execDate;
    /**0未执行 1执行成功 2执行失败*/
    private String execStatus;
    /**执行备注*/
    private String execMsg;
    private String jobId;
    public QuartzInfo(String serviceId, Date execDate, String execStatus, String execMsg) {
        this.serviceId = serviceId;
        this.execDate = execDate;
        this.execStatus = execStatus;
        this.execMsg = execMsg;
    }
}
